package com.zhentao.model.pojo.car.enums;

public enum CarBattery {

    LEAD_ACID_BATTERIES(1, "铅酸电池"),
    MH_NI(2,"镍氢电池"),
    LITHIUM_COBALT_OXIDE(3,"钴酸锂电池"),
    LITHIUM_MANGANATE_ION_BATTERY(4,"锰酸锂离子电池"),
    LITHIUM_IRON_PHOSPHATE_ION_BATTERY(5,"磷酸铁锂离子电池"),
    TERNARY_LITHIUM_ION_BATTERY(6,"三元锂离子电池");
    int code;
    String text;

    CarBattery(int code, String text){
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }
    public static String getCarBattery(int code){
        switch (code){
            case 1:
                return CarBattery.LEAD_ACID_BATTERIES.getText();

            case 2:
                return CarBattery.MH_NI.getText();

            case 3:
                return CarBattery.LITHIUM_COBALT_OXIDE.getText();

            case 4:
                return CarBattery.LITHIUM_MANGANATE_ION_BATTERY.getText();

            case 5:
                return CarBattery.LITHIUM_IRON_PHOSPHATE_ION_BATTERY.getText();

            case 6:
                return CarBattery.TERNARY_LITHIUM_ION_BATTERY.getText();
        }
        return null;
    }
}
